<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Corporate_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-corporate_name" class="form-control" name="row[corporate_name]" type="text" value="{$row.corporate_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('City')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class='control-relative'><input id="c-city" class="form-control" data-toggle="city-picker" name="row[city]" type="text" value="{$row.city|htmlentities}"></div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">活动时间</label>
        <div class="col-xs-6 col-sm-2">
            <input id="c-activity_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[activity_start_time]" type="text" value="{$row.activity_start_time}">
        </div>
        <div class="col-xs-6 col-sm-2">
            <input id="c-activity_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[activity_end_time]" type="text" value="{$row.activity_end_time}">
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Activity_end_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-activity_end_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[activity_end_time]" type="text" value="{$row.activity_end_time}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Activity_start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-activity_start_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[activity_start_time]" type="text" value="{$row.activity_start_time}">
        </div>
    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Total_sales_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total_sales_price" class="form-control" step="0.01" name="row[total_sales_price]" type="number" value="{$row.total_sales_price|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-number" class="form-control" name="row[number]" type="number" value="{$row.number|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Payment_method')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-payment_method" class="form-control selectpicker" name="row[payment_method]">
                {foreach name="paymentMethodList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.payment_method"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Day')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-day" class="form-control" name="row[day]" type="number" value="{$row.day|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Prepayments')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-prepayments" class="form-control" step="0.01" name="row[prepayments]" type="number" value="{$row.prepayments|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">费用报价:</label>
        <div class="col-xs-12 col-sm-8">
            <table class="table table-responsive fieldlist"   data-name="row[cost_quotation]" data-template="testtpl" data-tag="tr">
                <tr>
                    <td>费用说明</td>
                    <td>单价</td>
                    <td>数量</td>
                    <td>次数</td>
                    <td>小计</td>
                    <td></td>
                </tr>
                <tr>
                    <td style="text-align: right">
                        合计费用：
                    </td>
                    <td colspan="3" style="text-align: left">
                        <input id="total_fee" class="form-control" step="0.01" name="row[total_fee]" value="{$row.total_fee}" type="number" size="10">
                    </td>
                    <td style="text-align: left" colspan="2">
                        <!--<button id="calculate_cost" type="button">计算费用</button>-->
                    </td>

                </tr>
                <tr>
                    <td colspan="5" style="text-align: center"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 增加费用</a></td>
                </tr>
                <textarea name="row[cost_quotation]" class="form-control hide" cols="30" rows="5">{$row.cost_quotation}</textarea>
            </table>
            <!--定义模板-->
            <script type="text/html" id="testtpl">
                <tr class="form-inline fee">
                    <td><input type="text" name="row[<%=name%>][<%=index%>][fee]" class="form-control" value="<%=row['fee']%>" size="30"></td>
                    <td><input type="number" step="0.01" name="row[<%=name%>][<%=index%>][unit_price]" class="form-control" value="<%=row['unit_price']%>" size="10"></td>
                    <td><input type="number" step="1" name="row[<%=name%>][<%=index%>][quantity]" class="form-control" value="<%=row['quantity']%>" size="10"></td>
                    <td><input type="number" step="1" name="row[<%=name%>][<%=index%>][frequency]" class="form-control" value="<%=row['frequency']%>" size="10"></td>
                    <td><input type="number" step="1" name="row[<%=name%>][<%=index%>][subtotal]" class="form-control" value="<%=row['subtotal']%>" size="10"></td>
                    <td><span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span></td>
                </tr>
            </script>
        </div>
    </div>



    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Total_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total_fee" class="form-control" step="0.01" name="row[total_fee]" type="number" value="{$row.total_fee|htmlentities}">
        </div>
    </div>-->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">费用报价:</label>
        <div class="col-xs-12 col-sm-8">
            <table class="table table-responsive fieldlist"   data-name="row[cost]" data-template="testtp2" data-tag="tr">
                <tr>
                    <td>费用类别</td>
                    <td>费用描述</td>
                    <td>成本单价</td>
                    <td></td>
                </tr>
                <tr>

                    <td colspan="4" style="text-align: left">
                        成本费用： <input id="cost_fee" class="form-control" step="0.01" name="row[cost_fee]" value="{$row.cost_fee}" type="number" size="10">
                    </td>


                </tr>
                <!--<tr>
                    <td colspan="3" style="text-align: center"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> 增加费用</a></td>
                </tr>-->
                <textarea name="row[cost]" class="form-control hide" cols="30" rows="5">{$row.cost}</textarea>
            </table>
            <!--定义模板-->
            <script type="text/html" id="testtp2">
                <tr class="form-inline fee">
                    <td><input type="text" name="row[<%=name%>][<%=index%>][title]" class="form-control" value="<%=row['title']%>" size="30"></td>
                    <td><input type="text"  name="row[<%=name%>][<%=index%>][describe]" class="form-control" value="<%=row['describe']%>" size="10"></td>
                    <td><input type="number" step="1" name="row[<%=name%>][<%=index%>][price]" class="form-control" value="<%=row['price']%>" size="10"></td>
                    <td><span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span> <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span></td>
                </tr>
            </script>
        </div>
    </div>
    <<!--div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cost_fee')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cost_fee" class="form-control" step="0.01" name="row[cost_fee]" type="number" value="{$row.cost_fee|htmlentities}">
        </div>
    </div>-->
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Total_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total_price" class="form-control" step="0.01" name="row[total_price]" type="number" value="{$row.total_price|htmlentities}">
        </div>
    </div>-->
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Total_estimated_cost')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total_estimated_cost" class="form-control" step="0.01" name="row[total_estimated_cost]" type="number" value="{$row.total_estimated_cost|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Estimated_gross_profit')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-estimated_gross_profit" class="form-control" step="0.01" name="row[estimated_gross_profit]" type="number" value="{$row.estimated_gross_profit|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Total_cost')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-total_cost" class="form-control" step="0.01" name="row[total_cost]" type="number" value="{$row.total_cost|htmlentities}">
        </div>
    </div>-->
    <!--<div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>-->
</form>
